package org.vshe.improve.hibernate.recipes.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "book")
public class Book implements Serializable{

	private static final long serialVersionUID = -6838564600198576126L;
	
	@Column(name = "isbn")
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private String isbn;
	
	@Column(name = "book_name")	
	private String bookName;
	
	@Column(name = "publisher_code")
	private String publisherCode;
	
	@Column(name = "publisher_date")
	private Date publisherDate;
	
	@Column(name = "price")
	private Integer price;
	
	public Book() {
		super();
	}

	public String getIsbn() {
		return isbn;
	}

	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}

	public String getBookName() {
		return bookName;
	}

	public void setBookName(String bookName) {
		this.bookName = bookName;
	}

	public String getPublisherCode() {
		return publisherCode;
	}

	public void setPublisherCode(String publisherCode) {
		this.publisherCode = publisherCode;
	}

	public Date getPublisherDate() {
		return publisherDate;
	}

	public void setPublisherDate(Date publisherDate) {
		this.publisherDate = publisherDate;
	}

	public Integer getPrice() {
		return price;
	}

	public void setPrice(Integer price) {
		this.price = price;
	}

	@Override
	public String toString() {
		return "Book [isbn=" + isbn + ", bookName=" + bookName
				+ ", publisherCode=" + publisherCode + ", publisherDate="
				+ publisherDate + ", price=" + price + "]";
	}
	
	
	
}
